package com.ui.basic.assembler.trans;

import java.util.List;

import com.common.basic.base.BaseAssembler;
import com.ui.basic.command.trans.CommandCashtrans;
import com.ui.basic.ibatis.model.trans.TblTCashtrans;

public class CashtransAssembler implements BaseAssembler<TblTCashtrans, CommandCashtrans> {

	public CommandCashtrans toDto(TblTCashtrans entity) {
		CommandCashtrans dto = new CommandCashtrans();
		dto.setId(entity.getId());
		dto.setCustomerId(entity.getCustomerId());
		dto.setDesc(entity.getDscp());
		dto.setLocId(entity.getLocId());
		dto.setTransType(entity.getTransType());
		dto.setTransDate(entity.getTransDate());
		dto.setAmount(entity.getAmount());
		return dto;
	}

	public List<CommandCashtrans> toDtoList(List<TblTCashtrans> listEntity) {
		return null;
	}

	public TblTCashtrans toEntity(CommandCashtrans dto) {
		TblTCashtrans entity = new TblTCashtrans();
		entity.setId(dto.getId());
		entity.setCustomerId(dto.getCustomerId());
		entity.setDscp(dto.getDesc());
		entity.setLocId(dto.getLocId());
		entity.setTransType(dto.getTransType());
		entity.setTransDate(dto.getTransDate());
		entity.setAmount(dto.getAmount());
		return entity;
	}

}
